package com.groupname.dangerousdelves;

/**
 *  This class represents a door in the maze and any useful utility information
 *  that it contains.
 *
 *  @author Chris Fieldman
 *  @version 2012.11.03
 */
public class Door
    implements IActor
{
    //~-------------------------------------------------------------------------
    // Member Variables
    private boolean open;
    private int roomId; // The id of the room this door leads into

    //~-------------------------------------------------------------------------
    // Constructors
    /**
     * Create a new Door object.
     */
    public Door()
    {
        this.open = false;
    }

    //~-------------------------------------------------------------------------
    // Methods
    /**
     * Retrieves whether this tile can be moved into.
     * @return True if the door is open, false otherwise
     */
    public boolean isMovable()
    {
        return this.open;
    }

    /**
     * Retrieves the type of actor this tile is.
     * @return Door, since this is a door actor
     */
    public ActorType getActorType()
    {
        return ActorType.Door;
    }

    // ----------------------------------------------------------
    /**
     * Retrieves the id of the room this door leads into.
     * @return The id of the room this door leads into
     */
    public int getRoomId()
    {
        return this.roomId;
    }
}